<!DOCTYPE HTML>
<html lang="zh-CN">
<head>
	<meta charset="utf-8" />
	<title>科研院所认证</title>
	<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0;" />
	<meta name="format-detection" content="telephone=no" />
	<link type="text/css" rel="stylesheet" href="{weixin::$staticFilePath}/css/style.css" />
    <link type="text/css" rel="stylesheet" href="/tpl/Wap/default/common/css/products/4/css/style.css" />
	<script src="{weixin::$staticFilePath}/js/jquery.min.js" type="text/javascript"></script>
	<script type="text/javascript" src="{weixin::$staticFilePath}/js/main.js"></script>
    <script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
    <script src='/tpl/Wap/default/js/share.js'></script>
    <script type="text/javascript">
	var title = "{weixin:$name}";
    var desc  = "{weixin:$wxshop.wxshop_desc}";
	var link  = "{weixin::C('site_url')}/index.php?g=Wap&m=Product&a=products&token={weixin:$_GET['token']}";
    var imgUrl = "{weixin::C('site_url')}/images/logo.png";
	var appId= '{weixin:$signPackage["appId"]}';
    var timestamp = '{weixin:$signPackage["timestamp"]}';
    var nonceStr = '{weixin:$signPackage["nonceStr"]}';
    var signature= '{weixin:$signPackage["signature"]}';
	$(function(){ 
  		share(title,desc,link,imgUrl,appId,timestamp,nonceStr,signature);
 	}); 
    </script>
    <style type="text/css">
	   th
	   {
		   color:white;
		   font-size:16px;
		   height:30px;
	   }
       th,td
        {
            border-bottom: solid #eee 1px;
        }
    </style>
    <script>
	 function add_collect(goods_id)
	{
		$.ajax({
    		url: "{weixin::U('Userinfo/add_collect',array('token'=>$token))}"+'&id='+goods_id,
    		success: function( data ) {
    			if(data == 1)
				{
					alert("成功添加关注");
				}
				else
				{
					alert("已经取消关注");
				}
    		}
    	});
	}
	
	 function firmDel(id)
   {
	  document.getElementById('message-notice_'+ id).style.display='block';
   }

	</script>
</head>

<body style="line-height:1.6">
	  <include file="Product:menu"/>
      <div style="background:#ffffff;width:100%;">
        <include file="Product:group_subscribe"/>
      </div>
	<div class="u_main">
   <!-- <div style="background-color:#dddddd"><h3>{weixin:$userinfo.user_name}总共收藏{weixin:$count}个商品</h3></div>-->
    <div>
 <table width="100%" cellspacing="1" cellpadding="5" border="0" bgcolor="#dddddd">

    <tbody>
        <tr align="center">
            <th width="35%" bgcolor="#89be05">商品名称</th>
            <th width="30%" bgcolor="#89be05">价格</th>
            <th width="35%" bgcolor="#89be05">操作</th>
        </tr>
         <volist name="collects" id="collect"> 
        <tr align="center">
            <td bgcolor="#ffffff">
              <a class="f6" href="{weixin::U('Product/product',array('token'=>$_GET['token'],'id'=>$collect['goods_id']))}">
                <li style="line-height:30px; list-style:none"><img height="38px" width="38px" src="{weixin::C('link_shop_url')}{weixin:$collect.goods_thumb}"/></li>
                <li style="list-style:none;width:80px; color:#666; font-size:8px; height:22px; overflow:hidden"><font>{weixin:$collect.goods_name}</font></li>
              </a>
            </td>
            <td bgcolor="#ffffff">{weixin:$collect.shop_price} 元</td>
            
            <!--<td bgcolor="#ffffff" align="center" onClick="add_collect({weixin:$collect.goods_id})">取消关注</td>-->
            <td bgcolor="#ffffff" align="center" onClick="firmDel({weixin:$collect.goods_id})"><a class="u_order_return ts1">取消关注</a></td>
            <div id="message-notice_{weixin:$collect.goods_id}" class="mod_dialog" style="display:none; font-size:15px;">
                     	<div class="dialog_mask"></div>
                     	<div class="dialog_main qb_br qb_tac">
                   			<div class="dialog_bd">确定要取消关注该商品吗？</div>
                			<div class="dialog_ft qb_flex">
                 			 <a href="{weixin::U('Userinfo/collect',array('token'=>$_GET['token']))}" class="flex_box" style="float: left;">取消</a>
                  			<a href="{weixin::U('Userinfo/deleteCollect',array('token'=>$_GET['token'],'id'=>$collect['goods_id']))}" class="flex_box" style="float:right;">确定</a>
               				</div>
             			</div>
          			 </div>  
        </tr>
        </volist>
        <tr></tr>
    </tbody> 

</table>
<if condition="!$collects">
<div style="margin:10px; margin-top:30px; font-size:16px; color: #6C3"><center>您还没有关注商品</center></div>
</if>
    </div>
</div>